package com.tengju.user.domain.model;

import lombok.Data;
import lombok.Setter;

import java.io.Serializable;

@Data
@Setter
public class PageQuery implements Serializable {

    private static final long serialVersionUID = 1L;
    
    private Integer pageSize = 10;
    
    private Integer pageIndex = 1;

    private Integer offset;

    public Integer getOffset() {
        return (pageIndex - 1) * pageSize;
    }
}
